inspired by Bikash Bhattacharjee --auto --s2